/* 
 * File:   DriverBidang.cpp
 * Author: Mirza
 *
 * Created on March 7, 2012, 3:52 PM
 */

#include <cstdlib>
#include <iostream>
#include "../Bidang/Bidang.h"
#include "../Point/Point.h"
#include "../Sel/Sel.h"

using namespace std;

int main(int argc, char** argv) {
    int i,n,x,y;
    Point Arr[100];
  
    cout << "Banyak sudut : ";
    cin >> n;
    for(i=0;i<n;i++){
        cout << "Titik " << i+1 << " : ";
        cin >> x >> y;
        Arr[i].setPoint(x,y);
    }
    Bidang B(n,Arr);
    cout << "B\n" << B.GetContent() << ","  << B.GetN() << " " << B << endl;
    cout << "Banyak sudut : ";
    cin >> n;
    for(i=0;i<n;i++){
        cout << "Titik " << i+1 << " : ";
        cin >> x >> y;
        Arr[i].setPoint(x,y);
    }
    Bidang C(n,Arr);
    cout << "C\n" << C.GetContent() << ","  << C.GetN() << " " << C << endl;
    B=C;
    cout << "B=C\n" << B.GetContent() << ","  << B.GetN() << " " << B << endl;
    cout << "Pindah : ";
    cin >> x >> y;
    B.Move(x,y);
    if(!B.inLatar(0,0,40,20)) B.Move(-1*x,-1*y);
    cout << "B\n" << B.GetContent() << ","  << B.GetN() << " " << B << endl;
    C.Sweep();
    cout << "C\n" << C.GetContent() << ","  << C.GetN() << " " << C << endl;
    return 0;
}

